package com.buydeem.adapter;

/**
 * 新登录接口实现
 *
 * @author zengchao
 * @date 2022-04-29 14:38:38
 */
public class NewLoginServiceImpl implements INewLoginService{

    private static final String PASSWORD = "654321";

    @Override
    public void loginWithUserNameAndPassword(String userName, String password) {
        if (PASSWORD.equals(password)){
            System.out.println(String.format("新登录实现:用户[%s]登录成功",userName));
        }else {
            throw new RuntimeException("密码错误");
        }
    }
}
